package config;

import com.entity.Car;
import com.entity.Dog;
import org.springframework.context.annotation.*;

@Configuration
@ComponentScan("com.entity")
@PropertySource(value={"classpath:/car.properties","classpath:/db.properties"})
public class ConfigOfBeanLife {

    @Bean(initMethod = "initMethod")
    public Car car(){
        return new Car();
    }

    @Profile("test")
    @Bean
    public Dog dog(){
        return new Dog();
    }
}
